<br>
<h1>공통코드 정보</h1>
<table border="0" cellpadding="0" cellspacing="0" >
  <tr>
    <td align="left"><%= link_to '코드그룹생성', new_commoncode_path %></td>
    <td align="left"><%= link_to '세부코드생성', new_basecode_path %></td>
  </tr>
  <tr>
    <td width="250" valign="top">
      <table border="1" cellpadding="0" cellspacing="0" >
        <tr>
          <th width="100">명칭</th>
          <th width="50">코드</th>
          <th width="100" colspan="2">수정</th>
        </tr>
        <% @commoncodes.each do |commoncode| %>
          <tr align="center">
            <td><%=h commoncode.Name %></td>
            <td><%=h commoncode.Code %></td>
            <td><%= link_to '수정', edit_commoncode_path(commoncode) %></td>
            <td><%= link_to '삭제', commoncode, :confirm => 'Are you sure?', :method => :delete %></td>
          </tr>
        <% end %>
      </table>
    </td>
    <td width="350" align="top">
      <% form_tag commoncodes_path, :method => 'get' do %>
        <%= text_field_tag :search, params[:search] %>
        <%= submit_tag "Search", :name => nil %>
      <%end%><BR/>
      <table border="1" cellpadding="0" cellspacing="0">
        <tr>
          <th width="100">그룹코드</th>
          <th width="50">코드</th>
          <th width="100">명칭</th>
          <th width="100" colspan="2">수정</th>
        </tr>
        <% @basecode.each do |basecode| %>
          <tr align="center">
            <td><%=h basecode.ParentCode %></td>
            <td><%=h basecode.Code %></td>
            <td><%=h basecode.Name %></td>
            <td><%= link_to '수정', edit_basecode_path(basecode) %></td>
            <td><%= link_to '삭제', basecode, :confirm => 'Are you sure?', :method => :delete %></td>
          </tr>
        <% end %>
      </table>

    </td>
  </tr>
</table>
<br />
